home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / jmod311.zip / UART.H < prev   
Text File  |  1992-02-02  |  4KB  |  57 lines

  1. /****************************************************************************/
  2. /*    FILE UART.H                                                           */
  3. /*    Created 11-JAN-1990                   Richard B. Johnson              */
  4. /*                                          450 Broughton Drive             */
  5. /*                                          Beverly, Massachusetts 01915    */
  6. /*                                          BBS (508) 922-3166              */
  7. /*        Parameters for the 8250 UART and hardware ports.                  */
  8. /****************************************************************************/
  9. #define BASE            0x00            /* Base port                    */
  10. #define TX_BUF          0x00            /* Transmitter buffer           */
  11. #define RX_BUF          0x00            /* Receiver buffer              */
  12. #define IER             0x01            /* Interrupt enable register    */
  13. #define IIR             0x02            /* Interrupt ident register     */
  14. #define LCR             0x03            /* Line control register        */
  15. #define MCR             0x04            /* Modem control register       */
  16. #define LSR             0x05            /* Line status register         */
  17. #define MSR             0x06            /* Modem status register        */
  18.  
  19. #define MCR_DTR         0x01            /* Data terminal ready          */
  20. #define MCR_RTS         0x02            /* Request to send              */
  21. #define MCR_OUT1        0x04            /* Control line 1               */
  22. #define MCR_OUT2        0x08            /* Control line 2 (enable IRQ)  */
  23. #define MCR_LOOP        0x10            /* Loopback control bit         */
  24.  
  25. #define MSR_DCTS        0x01            /* Delta clear to send          */
  26. #define MSR_DDSR        0x02            /* Delta data set ready         */
  27. #define MSR_TERI        0x04            /* Trailing edge ring indicator */
  28. #define MSR_DSLSD       0x08            /* Delta receive line signal    */
  29. #define MSR_CTS         0x10            /* Clear to send                */
  30. #define MSR_DSR         0x20            /* Data set ready               */
  31. #define MSR_RI          0x40            /* Ring indicator               */
  32. #define MSR_RLSD        0x80            /* Received line signal detect  */
  33.  
  34. #define LSR_DR          0x01            /* Data ready                   */
  35. #define LSR_OR          0x02            /* Overrun error                */
  36. #define LSR_PE          0x04            /* Parity error                 */
  37. #define LSR_FE          0x08            /* Framing error                */
  38. #define LSR_BI          0x10            /* Break interrupt              */
  39. #define LSR_THRE        0x20            /* Trans holding register empty */
  40. #define LSR_TSRE        0x40            /* Trans shift register empty   */
  41. #define LSR_NOP         0x80            /* Not used                     */
  42.  
  43. #define IER_ERBFI       0x01            /* Enable Recev data available  */
  44. #define IER_ETBEI       0x02            /* Enable Trans holding empty   */
  45. #define IER_ELSI        0x04            /* Enable Recev line status     */
  46. #define IER_EDSSI       0x08            /* Enable Modem status          */
  47.  
  48. #define IIR_MOD         0x00            /* Modem status                 */
  49. #define IIR_IP          0x01            /* Interrupt pending            */
  50. #define IIR_THE         0x02            /* Tx holding register empty    */
  51. #define IIR_RDA         0x04            /* Received data available      */
  52. #define IIR_RLS         0x06            /* Receiver line status         */
  53. #define MSR_CHK        (MSR_DSR | MSR_CTS | MSR_RLSD)
  54. #define MOD_ENA        (MCR_DTR | MCR_RTS | MCR_OUT2)
  55. /****************************************************************************/
  56. /*********************** E N D  O F   M O D U L E ***************************/
  57.